package com.gipson.amc.utils;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * 读取config.properties配置文件信息
 *
 * @author Evan
 *
 */
@ConfigurationProperties
@Configuration
public class PropertyUtil {

	private static String fileRoot;

	private  static String fileTemp;

	private  static String fileUrl;

	private static String address;
	
	private static String applicationId;

	public static String getFileRoot() {
		return fileRoot;
	}

	@Value("${file.root}")
	public void setFileRoot(String fileRoot) {
		PropertyUtil.fileRoot = fileRoot;
	}

	public static String getFileTemp() {
		return fileTemp;
	}

	@Value("${file.temp}")
	public void setFileTemp(String fileTemp) {
		PropertyUtil.fileTemp = fileTemp;
	}

	public static String getFileUrl() {
		return fileUrl;
	}


	@Value("${file.url}")
	public void setFileUrl(String fileUrl) {
		PropertyUtil.fileUrl = fileUrl;
	}

	public static String getAddress() {
		return address;
	}

	@Value("${file.address}")
	public void setAddress(String address) {
		PropertyUtil.address = address;
	}
	
	public static String getApplicationId() {
		return applicationId;
	}
	
	@Value("${client-token.appid}")
	public void setAppId(String applicationId) {
		PropertyUtil.applicationId = applicationId;
	}

}
